#ifndef QSSDEBUGKEYPRESSEATER_H
#define QSSDEBUGKEYPRESSEATER_H

#include "qboxlayout.h"
#include "qdialog.h"
#include "qtextedit.h"
#include <QKeyEvent>
#include <QWidget>

class QssDebugKeyPressEater : public QObject
{
    Q_OBJECT
public:
    explicit QssDebugKeyPressEater(QWidget *parent, bool usedialog = false, Qt::Key pressKey = Qt::Key_F12);
    explicit QssDebugKeyPressEater(QObject *parent, QWidget *target, bool usedialog = false, Qt::Key pressKey = Qt::Key_F12);

private:
    Qt::Key m_pressKey;
    QWidget *m_target;

    QTextEdit *m_textedit;
    QTextEdit *m_mapedit;
    QDialog *m_dialog;
    QVBoxLayout *m_dialoglayout;
    bool m_editinit;
    bool m_usedialog;

    // QObject interface
public:
    bool eventFilter(QObject *watched, QEvent *event);
};

#endif // QSSDEBUGKEYPRESSEATER_H
